package com.dmlll.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
public class ResultObj {

    public static final ResultObj LOGIN_PWD_ERROR = new ResultObj(Constant.ERROR,Constant.PWD_ERROR);
    public static final ResultObj LOGIN_ACC_ERROR = new ResultObj(Constant.ERROR,Constant.ACC_ERROR);
    public static final ResultObj LOGIN_CODE_ERROR = new ResultObj(Constant.ERROR,Constant.CODE_ERROR);
    public static final ResultObj ADD_SUCCESS = new ResultObj(Constant.OK,Constant.ADD_SUCCESS);
    public static final ResultObj ADD_ERROR = new ResultObj(Constant.ERROR,Constant.ADD_ERROR);
    public static final ResultObj ADD_ERROR_HAVE = new ResultObj(Constant.ERROR,Constant.ADD_ERROR_HAVE);
    public static final ResultObj UPDATE_SUCCESS = new ResultObj(Constant.OK,Constant.UPDATE_SUCCESS);
    public static final ResultObj UPDATE_ERROR = new ResultObj(Constant.ERROR,Constant.UPDATE_ERROR);
    public static final ResultObj DELETE_SUCCESS = new ResultObj(Constant.OK,Constant.DELETE_SUCCESS);
    public static final ResultObj DELETE_ERROR = new ResultObj(Constant.ERROR,Constant.DELETE_ERROR);
    public static final ResultObj INPUT_SUCCESS = new ResultObj(Constant.OK,Constant.INPUT_SUCCESS);
    public static final ResultObj INPUT_ERROR = new ResultObj(Constant.ERROR,Constant.INPUT_ERROR);
    public static final ResultObj DELETE_HAVE_CATALOG = new ResultObj(Constant.ERROR,Constant.DELETE_HAVE_CATALOG);
    public static final ResultObj DELETE_HAVE_PURCHASE = new ResultObj(Constant.ERROR,Constant.DELETE_HAVE_PURCHASE);
    private Integer code;
    private String msg;
    private Integer num;
    public static final ResultObj LOGIN_SUCCESS = new ResultObj(Constant.OK,Constant.SUCCESS);
    private ResultObj(Integer code,String msg){
        this.code = code;
        this.msg = msg;
    }
    public ResultObj(Integer code,String msg,Integer num){
        this.code = code;
        this.msg = msg;
        this.num = num;
    }
}
